package com.huawei;

/**
 * Created by Z-hong on 2024/7/24.
 */

import java.util.ArrayList;
import java.util.Scanner;

public class HJ74 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int index = 0;
        boolean flag = false;
        ArrayList<String> arrayList = new ArrayList<>();
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == ' ' && !flag) {
                String substring = str.substring(index, i);
                if (!substring.isEmpty()) {
                    arrayList.add(substring);
                }
                index = i + 1;
            } else if (a == '"' && !flag) {
                index=i+1;
                flag = true;
            } else if (a == '"' && flag) {
                arrayList.add(str.substring(index, i));
                index = i + 1;
                flag = false;
            } else if (i == str.length() - 1 && a != ' ') {
                arrayList.add(str.substring(index, i + 1));
            }
        }
        System.out.println(arrayList.size());
        for (String s : arrayList) {
            System.out.println(s);
        }
    }
}
